﻿using FluentNHibernate;
using FluentNHibernate.Mapping;
using MadMediaManager.Core.Domain;

namespace MadMediaManager.DataAccess.Mappings
{
    public class SoftwareLicenseMap : ClassMap<SoftwareLicense>
    {
        public SoftwareLicenseMap()
        {
            Id(l => l.EntityId, "Id")
                .GeneratedBy.Identity();
            References(l => l.SoftwareIso)
                .Not.Nullable()
                .LazyLoad();
            Map(l => l.Key)
                .Column("LicenseKey")
                .Not.Nullable();
            Map(l => l.Machine)
                .Nullable();
        }
    }
}
